{% extends "base.html" %}
{% load crispy_forms_tags %}

{% block title %}{{ title }} - 在线跑批系统{% endblock %}

{% block content %}
<div class="d-flex justify-content-between align-items-center mb-4">
    <h1>{{ title }}</h1>
    <!-- <a href="{% url 'server_list' %}" class="btn btn-secondary">
        <i class="fas fa-arrow-left me-1"></i>返回列表
    </a> -->
      <!-- 关键：添加保存和取消按钮（必须放在<form>标签内） -->
                    <div class="mt-4 d-flex gap-3">
                        <button type="submit" class="btn btn-success">
                            <i class="fas fa-save me-1"></i> 保存服务器
                        </button>
                        <a href="{% url 'server_list' %}" class="btn btn-secondary">
                            <i class="fas fa-arrow-left me-1"></i> 返回列表
                        </a>
                    </div>
</div>

<div class="card">
    <div class="card-body">
        <form method="post">
            {% csrf_token %}
            {{ form|crispy }}
        </form>
    </div>
</div>
{% endblock %}
